package com.neusoft.zqygbc.neusoft_wenda.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

import com.neusoft.zqygbc.neusoft_wenda.R;
import com.neusoft.zqygbc.neusoft_wenda.base.RecyclerViewAdapter;
import com.neusoft.zqygbc.neusoft_wenda.javeBean.AnswersEntity;

import java.util.List;

public class QuestionAnswerAdapter extends RecyclerViewAdapter<QuestionAnswerAdapter.ViewHolder> {


    public QuestionAnswerAdapter(Context context, List data, int layoutResource) {
        super(context, data, layoutResource);
    }

    @Override
    public void onBindViewHolder(final QuestionAnswerAdapter.ViewHolder holder, final int position) {
        final AnswersEntity answersEntity = (AnswersEntity) data.get(position);
        Log.v("zqy123123",answersEntity.getUid());
        Log.v("zqy123123",answersEntity.getAnswerstime());
        Log.v("zqy123123",answersEntity.getAnswerstexrt());
        holder.detail_answer_username.setText(answersEntity.getUsername());
        holder.detail_answer_date.setText(answersEntity.getAnswerstime());
        holder.detail_description.setText(answersEntity.getAnswerstexrt());


    }

    public static class ViewHolder extends RecyclerView.ViewHolder {
        TextView detail_answer_username,detail_answer_date,detail_description;



        public ViewHolder(View itemView) {
            super(itemView);
            detail_answer_username = (TextView) itemView.findViewById(R.id.detail_answer_username);
            detail_answer_date = (TextView) itemView.findViewById(R.id.detail_answer_date);
            detail_description = (TextView) itemView.findViewById(R.id.detail_description);

        }
    }






}

